#!/bin/bash

cwd=$(pwd)
echo 'Install basic tools...'
sudo pacman -S go neovim cmake

sudo rm /usr/bin/vi
sudo ln -s /usr/bin/nvim /usr/bin/vi
sudo ln -s /usr/bin/nvim /usr/bin/vim

echo 'Getting yay...'
yay_path=$HOME/Projects/yay

if [[ -d $yay_path ]]; then
  rm -rf $yay_path
fi

git clone https://aur.archlinux.org/yay.git -C $yay_path

cd $yay_path && makepkg -s && sudo pacman -U yay-*.pkg.tar.xz
cd $cwd

